/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "fiscal_parametros")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FiscalParametros.findAll", query = "SELECT f FROM FiscalParametros f")})
public class FiscalParametros implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(length = 7)
    private String vigencia;
    @Column(name = "DESCRICAO_VIGENCIA", length = 100)
    private String descricaoVigencia;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idFiscalParametros")
    private List<FiscalParImpostos> fiscalParImpostosList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idFiscalParametros")
    private List<FiscalParMunicipal> fiscalParMunicipalList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idFiscalParametros")
    private List<FiscalParEstadual> fiscalParEstadualList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idFiscalParametros")
    private List<FiscalParFederal> fiscalParFederalList;
    @JoinColumn(name = "ID_EMPRESA", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private Empresa idEmpresa;

    public FiscalParametros() {
    }

    public FiscalParametros(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getVigencia() {
        return vigencia;
    }

    public void setVigencia(String vigencia) {
        this.vigencia = vigencia;
    }

    public String getDescricaoVigencia() {
        return descricaoVigencia;
    }

    public void setDescricaoVigencia(String descricaoVigencia) {
        this.descricaoVigencia = descricaoVigencia;
    }

    @XmlTransient
    public List<FiscalParImpostos> getFiscalParImpostosList() {
        return fiscalParImpostosList;
    }

    public void setFiscalParImpostosList(List<FiscalParImpostos> fiscalParImpostosList) {
        this.fiscalParImpostosList = fiscalParImpostosList;
    }

    @XmlTransient
    public List<FiscalParMunicipal> getFiscalParMunicipalList() {
        return fiscalParMunicipalList;
    }

    public void setFiscalParMunicipalList(List<FiscalParMunicipal> fiscalParMunicipalList) {
        this.fiscalParMunicipalList = fiscalParMunicipalList;
    }

    @XmlTransient
    public List<FiscalParEstadual> getFiscalParEstadualList() {
        return fiscalParEstadualList;
    }

    public void setFiscalParEstadualList(List<FiscalParEstadual> fiscalParEstadualList) {
        this.fiscalParEstadualList = fiscalParEstadualList;
    }

    @XmlTransient
    public List<FiscalParFederal> getFiscalParFederalList() {
        return fiscalParFederalList;
    }

    public void setFiscalParFederalList(List<FiscalParFederal> fiscalParFederalList) {
        this.fiscalParFederalList = fiscalParFederalList;
    }

    public Empresa getIdEmpresa() {
        return idEmpresa;
    }

    public void setIdEmpresa(Empresa idEmpresa) {
        this.idEmpresa = idEmpresa;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FiscalParametros)) {
            return false;
        }
        FiscalParametros other = (FiscalParametros) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.FiscalParametros[ id=" + id + " ]";
    }
    
}
